﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Progream05
{
   public class Student
    {
        //学号
        public string No { get; set; }

        //姓名
        public string Name { get; set; }

        public int _age { get; set; }
        public int Age
        {
            get => _age;
            set => _age = value > 150 || value < 0 ? 0 : value;
        }
        public override string ToString() => $"学号:{No} 姓名:{Name} 成绩{Age}";

    }
}
